// @ts-ignore
/* eslint-disable */
import request from '@/request/http'

/** 获取图片验证码 获取图片验证码 GET /anyTenant/captcha */
export async function captcha(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.captchaParams,
  options?: { [key: string]: any }
) {
  return request<any>(`/oauth/anyTenant/captcha`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 验证验证码是否正确 验证验证码 GET /anyTenant/checkCaptcha */
export async function checkCaptcha(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.checkCaptchaParams,
  options?: { [key: string]: any }
) {
  return request<API.RBoolean>(`/oauth/anyTenant/checkCaptcha`, {
    method: 'GET',
    params: {
      // templateCode has a default value: CAPTCHA
      templateCode: 'CAPTCHA',
      ...params
    },
    ...(options || {})
  })
}

/** 发送邮箱验证码 发送邮箱验证码 GET /anyTenant/sendEmailCode */
export async function sendEmailCode(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.sendEmailCodeParams,
  options?: { [key: string]: any }
) {
  return request<API.RBoolean>(`/oauth/anyTenant/sendEmailCode`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 发送短信验证码 发送短信验证码 GET /anyTenant/sendSmsCode */
export async function sendSmsCode(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.sendSmsCodeParams,
  options?: { [key: string]: any }
) {
  return request<API.RBoolean>(`/oauth/anyTenant/sendSmsCode`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}
